package com.donn.securitycontrolplatform.personimg.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.donn.securitycontrolplatform.db2.mapper.PersonImgMapper;
import com.donn.securitycontrolplatform.personimg.entity.PersonImg;
import com.donn.securitycontrolplatform.personimg.service.IPersonImgService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * LOC 用户 服务实现类
 * </p>
 *
 * @author zhenglx
 * @since 2022-06-23
 */
@Service
@DS("db2")
public class PersonImgServiceImpl extends ServiceImpl<PersonImgMapper, PersonImg> implements IPersonImgService {

    @Override
    public PersonImg getByPersonId(Integer personId) {
        QueryWrapper<PersonImg> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(PersonImg.PERSON_ID, personId);
        return getOne(queryWrapper);
    }
}
